perm filename NS.ME[S,DOC]6 blob
sn#123532 filedate 1974-10-07 generic text, type C, neo UTF8
COMMENT ā VALID 00024 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00005 00002 ** THIS FILE DOES NOT YET REFLECT ANY CHANGES TO NS AFTER 30-SEPT-74 **
C00008 00003 Contents Page 0
C00010 00004 News Service Page 1
C00014 00005 The News Service Program--NS Page 2
C00018 00006 Keyword Expressions Page 3
C00022 00007 Keyword Expressions Page 4
C00027 00008 Keyword Expressions Page 5
C00032 00009 Dates Page 6
C00036 00010 Dates Page 7
C00040 00011 The Time Range Page 8
C00044 00012 Command Lines and Switches Page 9
C00049 00013 Command Lines and Switches Page 10
C00054 00014 Command Lines and Switches Page 11
C00059 00015 Command Lines and Switches Page 12
C00063 00016 Display Commands Page 13
C00067 00017 Display Commands Page 14
C00072 00018 Display Commands Page 15
C00076 00019 ESCAPE-I Manual Interruptions Page 16
C00080 00020 Output Files Page 17
C00084 00021 Command File Input Page 18
C00088 00022 Headline Stories Page 19
C00093 00023 Using NS Page 20
C00098 00024 Comments on the Format of News Service Stories Page 21
C00100 ENDMK
Cā;
** THIS FILE DOES NOT YET REFLECT ANY CHANGES TO NS AFTER 30-SEPT-74 **
IN PARTICULAR, THE VERSION PUT UP ON 8-OCT-74 IS NOT DOCUMENTED HERE.
STANFORD ARTIFICIAL INTELLIGENCE LABORATORY 4 Sep 1974
OPERATING NOTE 72.1
READING THE WIRE SERVICE NEWS
By Martin Frost
ABSTRACT:
Stories from two news wires (the Associated Press and the New York
Times News Service) are collected and stored on disk as they come in
and can be read selectively through the use of the program NS. To
read the news using this program, the user types keyword expressions
to specify the stories of interest and gives display commands to have
particular stories presented. The News Service (NS) system features
the following: treatment of all but the most common words as
keywords; retention of the news for a number of days limited only by
disk space available (the user can specify which days' news he wants
to examine); choice of reading either or both of the news wires; and
display news presentation for users of Stanford displays.
Another program, HOT, is used to type out the news from either wire
as it is coming in.
The Associated Press news report is made available in these programs
for demonstration and research purposes only and caution must be
exercised to insure that the news is not published or broadcast or
publicly displayed or used for any commercial purpose.
Contents Page 0
C O N T E N T S
SECTION PAGE
The Wire Service News System . . . . . . . . . . . . 1
The Hot Line Program--HOT . . . . . . . . . . . . . 1
The News Service Program--NS . . . . . . . . . . . . 2
Keyword Expressions . . . . . . . . . . . . . . . 3
Dates . . . . . . . . . . . . . . . . . . . . 5
The Time Range . . . . . . . . . . . . . . . . . 7
Command Lines and Switches . . . . . . . . . . . . . 8
Display Commands . . . . . . . . . . . . . . . . 12
ESCAPE-I Manual Interruptions . . . . . . . . . . . . 16
Output Files . . . . . . . . . . . . . . . . . 16
Command File Input . . . . . . . . . . . . . . . 17
Headline Stories . . . . . . . . . . . . . . . . 18
Using NS . . . . . . . . . . . . . . . . . . . 19
Comments on the Format of News Service Stories . . . . . . 20
News Service Page 1
The Wire Service News System
We have two news wires (the Associated Press and the New York Times
News Service) over which we get national and international news (no
local news). The lines are read by a program that takes incoming
news stories and files them away on the disk. As each story is
filed, it is categorized by the words occurring in it. To retrieve
selected stories the user types to the NS program (described below) a
keyword expression indicating what words or combinations of words the
stories of interest should (or should not) contain.
Individuals can access the news through two programs, NS and HOT.
This document describes the use of these programs for reading the
news.
The Hot Line Program--HOT
The system program HOT provides the user a hot line to the news. To
read the incoming Associated Press news, type the monitor command
"HOT;AP" or just "HOT". To get the New York Times news, type
"HOT;NY" or just "HOT;". The program should type back either
"...Associated Press..." or "...New York Times News Service..."
followed by the last few lines of news that have come in on the
particular wire. Thereafter HOT will continue typing out the news as
it comes in over that wire.
After HOT has started, you can switch from one wire to another by
typing a carriage return. You can switch back and forth as often as
you like. Each time you switch, the name of the wire to which you
are switching is typed out along with a few lines that are in that
wire's buffer.
If the hot line is down (for instance for testing of the news
system), then HOT will tell you so and then stop. There are times
when no news is coming in; at such times, HOT will of course type out
nothing.
The News Service Program--NS Page 2
The News Service Program--NS
The system program NS allows quick access to stored news from any
given period of time. This program is started by typing the monitor
command: NS. The user can then select stories from the news by
typing in a keyword expression that indicates which words or
combinations of words a story must contain to be of interest. The
program will respond by telling the user how many stories match the
given expression, and following that, the user can give display
commands to have certain of those stories presented to him.
As each story comes in over one of the wires, it is categorized by
all the words occurring in it except for a small class of very common
words (such as "the", "a", "and", etc.). Before a word is used to
categorize or retrieve stories, if any one of the suffixes -S, -ES,
-ING, -ED and -LY is present, that suffix is removed so that
retrieval will not depend on the user's typing the exact form of the
word (singular or plural noun or verb; present or past tense or
participle of a verb) that occurs in the story. These suffixes are
removed in all their forms: when a letter is doubled before adding
-ING or -ED, the doubled letter is removed along with the -ING or
-ED; and suffixes formed when a final -Y is changed to -I before
adding -ES or -ED are removed correctly.
When a keyword expression is entered by the user, it is compared
against the categorization lists to find all the stories that fit the
expression. The keywords used in an expression can be any words
(consisting of letters only) except the few common words specifically
excluded from categorizations. If a common word is used in an
expression by mistake, the program will give a warning to that
effect.
Presentation of news to users on Stanford displays is done by
displaying a screenful of text at a time. News is presented on other
terminals by typing out a portion of a story at a time.
(In all expressions and commands typed to NS, no distinction is made
between upper-case letters and lower-case letters.)
Keyword Expressions Page 3
Keyword Expressions
To retrieve stories using NS, you type in a KEYWORD EXPRESSION, which
may be either a single keyword or an expression containing keywords
and the operators +, -, and *. Each keyword represents the set of
all the stories it occurs in. And the operators represent the set
operations UNION (+), INTERSECTION (*), and SET DIFFERENCE (-), which
are performed on the sets of stories which the keywords represent.
Thus, if you want all stories that mention both Nixon and Watergate,
you should type the keyword expression "NIXON * WATERGATE"; the
expression "NIXON + WATERGATE" represents all stories that mention
either Nixon or Watergate; and "NIXON - WATERGATE" represents all
stories that mention Nixon but not Watergate.
Multiple-word keywords such as "LOS ANGELES" can be used in keyword
expression just as single word keywords. However, the interpretation
of such multiple-word keywords is exactly that which would be made if
the individual words of the keyword were separated with stars (*'s)
instead of spaces. That is, "LOS ANGELES" is treated the same as
"LOS * ANGELES"; and "NIXON LOS ANGELES" is the same as
"NIXON * LOS * ANGELES".
The precedence of operators is the normal one: * takes precedence
over + and -, which have equal precedence. Operators with equal
precedence are evaluated from left to right. Parentheses may be used
freely in keyword expressions.
To clarify all this a little, here are a few examples:
Keyword Expression Meaning
--------------------------------- --------------------------------
(NIXON-DEAN+FORD)*IMPEACH All stories that mention both
IMPEACH and either (1) NIXON and
not DEAN or (2) FORD (and
possibly DEAN).
DEAN-NIXON-FORD-IMPEACH All stories that mention DEAN
but that mention none of NIXON,
FORD and IMPEACH.
SAN FRANCISCO+LOS ANGELES-WAR All stories that mention either
both SAN and FRANCISCO but not
WAR, or both LOS and ANGELES but
not WAR.
Keyword Expressions Page 4
To facilitate finding specific stories, a couple of special forms are
permitted to be used as keywords in keyword expressions. The first
of these is used to represent all those stories that have certain
news service sequence numbers. (For an explanation of sequence
numbers, see the section at the end of this writeup on COMMENTS ON
THE FORMAT OF NEWS SERVICE STORIES.) To represent all stories with
sequence numbers from N to M, use the form "#N:M". This form may
occur anywhere a keyword may occur in an expression. The form "#N:N"
represents all stories with sequence number N and may be abbreviated
"#N". Furthermore, the form "#0:99999" represents all stories and
may be abbreviated just "#". In the form "#N:M", if N>M then this
form represents all stories with sequence numbers greater than or
equal to N or less than or equal to M.
The second special form consists merely of a decimal number appearing
in place of a keyword. If a number K appears as the SECOND argument
of any operation, then that number represents the K most recent
stories of the other (first) argument of the operation. For example,
"NIXON * 10" represents the 10 most recent stories that mention
NIXON. If a number K appears as the FIRST argument of an operation,
or as the only term in a keyword expression, then that number
represents the most recent K stories in the news. For example,
"9 * NIXON" represents, of the latest 9 stories, any that mention
NIXON; and "5" represents the latest 5 news stories.
Below are some examples of these special forms in use.
#2 + #202 All stories with either of these
sequence numbers. (These are the
usual sequence numbers of the
AP news digests.)
#325:23 All stories with sequence number
greater than or equal to 325 or
less than or equal to 23.
# All stories. Useful if you want
to peruse through the news.
#321*BULLETIN Stories with sequence number 321
that contain the word BULLETIN.
5 - NIXON Of the latest 5 stories, all
that do not mention NIXON.
AP*NEWS*DIGEST*1 The latest AP news digest.
Keyword Expressions Page 5
When you type a keyword expression, the program makes up a list of
all the stories that fit the expression. This list is called your
CURRENT STORY LIST. When you type the next keyword expression, a new
current story list is generated (unless no stories fit your new
expression) and your former current story list is saved as your
PREVIOUS STORY LIST. If you want to get back the previous story
list, use the /EXCHAN switch (see the section on COMMAND LINES AND
SWITCHES) which exchanges your current and previous story lists.
This feature is especially useful if you are examining news from
several days: The program only keeps one day's categorization lists
in core at a time and thus must read in one large file for each day's
news under consideration every time you enter a new keyword
expression. Retrieving your previous story list is thus much faster
than reconstructing it through a keyword expression, especially when
news from several days is being considered.
Your current story list can be modified without typing again the
keywords you used to get it. If a keyword expression starts with +,
-, or *, the missing (first) operand is taken to be the last keyword
expression you typed. For example, if you have typed in "NIXON" as
your last keyword expression, you can type in "*VIETNAM" as your next
expression and you will get only stories that mention both NIXON and
VIETNAM.
NS keeps track of the stories you have seen. When a new keyword
expression is evaluated, any stories found that you have already
looked at are removed from the new current story list. The number of
stories so removed is reported along with the number of other stories
found. To inhibit this removal of stories already seen, change from
the initial /-AGAIN mode to /AGAIN mode. See the /AGAIN switch in
the section on COMMAND LINES AND SWITCHES.
Dates
When started up, NS expects to reference only the news that has come
in today. However, by using the date switches you can select what
range of dates is to be considered in constructing a story list from
a keyword expression. The program keeps in core only one day's
categorization lists for one news wire. If you are reading news from
only one day and only one wire, NS will only have to read in the file
containing that date's categorization lists once. But with two or
more days in the date range, or when reading news from both wires,
one or more data files must be read in each time you type a keyword
expression.
Dates Page 6
The date range can be set with the date switches (explained later).
The /FROM switch sets the beginning date of this range, the /TO
switch sets the ending date of the range, and the /ON and /DURING
switches set both the beginning and ending dates. Each of these
switches requires a date to be typed after the switch. This date can
take any of the following example forms:
MEANING AS MEANING AS
DATE BEGINNING DATE ENDING DATE
TODAY today today
YESTERDAY yesterday same
SUNDAY last Sunday before today same
MONDAY last Monday before today same
... ... ...
SATURDAY last Saturday before today same
24-MAY-74 24 May 1974 same
74-MAY-24 24 May 1974 same
MAY-24-74 24 May 1974 same
MAY-24-1974 24 May 1974 same
...
MAY-24 24 May of current year same
24-MAY 24 May of current year same
MAY-74 1 May 1974 31 May 1974
MAY 1 May of current year 31 May of current year
24 24th day of current month same
74 1 January 1974 31 December 1974
1974 1 January 1974 31 December 1974
No spaces are allowed in the middle of a date. Dashes are used to
connect parts of a date (month, day and year), which can be in any
order. Names of months and days of the week and the words "TODAY"
and "YESTERDAY" may be abbreviated to three letters (or less if
unambiguous).
Here are some date switches with dates and their effect on the date
range.
/ON TODAY Date range becomes today only.
/DURING MAY Date range runs from 1 May to 31 May of current
year.
/DURING 74 Date range runs from 1 Jan 1974 to 31 Dec 1974.
/FROM TUES/TO TOD (This is two switches in same command.) Date
range is from last Tuesday (a week ago if today
is a Tuesday) to today.
/ON WED Date range is last Wednesday only.
Dates Page 7
/ON 24-MAY Date range is 24 May of current year.
/ON YESTERDAY Date range is yesterday only.
The Time Range
In addition to being able to specify the range of dates from which
news is to be retrieved, the user can choose to consider only news
that has come in after a given time and/or before another given time.
The combined time/date range extends from a specifiable time on the
beginning date to another specifiable time on the ending date. In
evaluating keyword expressions, only stories that have come in during
the time period given will be allowed to match the expression.
The beginning time is set with the /AFTER switch and the ending time
with the /BEFORE switch. The beginning time is cleared whenever a
beginning date is given using a date switch; the ending time is
similarly cleared whenever an ending date is given. (The times are
cleared even if the new dates specified are the same as the old
ones.)
The time range feature is especially useful if you read the news more
than once on a given day and do not want to see the same stories
twice. For instance, if you read the news in the afternoon and have
run NS at, say, 11am, then typing "/AFTER 11" will prevent the
program from retrieving stories that you have already read (except
when new parts have come in and have been attached to earlier
stories).
The /AFTER and /BEFORE switches must be followed by a time (Pacific
Time) in one of the following example formats:
TIME MEANING TIME MEANING
0000 midnight 2400 midnight (day later)
0500 5:00am 8:34a 8:34am
0612 6:12am 9:45 9:45am
11 11:00am 1056AM 10:56am
12 noon 12:21 12:21pm
13 1:00pm 2:22p 2:22pm
1311 1:11pm 3:23pm 3:23pm
435PM 4:35pm
The times 12am and 12pm, being somewhat ambiguous, are illegal: use 0
or 24 for midnight and 12 for noon. Note that the times 0000 on
The Time Range Page 8
Wednesday and 2400 on Tuesday are the same, but 0 and 24 Wednesday
are a day apart.
After 9pm Pacific Time new stories are filed under the following
day's date. Thus if you have no time limits and your date range is
/FROM MONDAY/TO TUESDAY, then you may get stories with times anywhere
from 9pm SUNDAY (sic) to 9pm TUESDAY.
The /DATES command switch will type out your current time/date range.
Also, whenever you change the time/date range, its new value will be
typed out.
Command Lines and Switches
When NS is ready to accept a keyword expression, it will type out
"*KEY: " and wait for a command line to be typed by the user. A
command line can contain either a keyword expression or some switches
or both. A switch is a slash (/) followed by the name of a switch,
possibly followed by an argument for the switch. Switches are used
for setting the times and dates for which stories are to be
retrieved, determining the modes in which stories will be presented,
and giving special commands. A command switch may appear only by
itself on a command line.
Switches that set modes of presentation can be set temporarily or
permanently. Any mode switches that FOLLOW a keyword expression on a
command line are interpreted as temporary and are in effect only
during evaluation of the current keyword expression--after that the
permanent switch values take effect again. Any mode switches that
precede a keyword expression or that occur on a command line without
any keyword expression are made permanent. To disable a mode switch,
type a slash (/) followed by a minus sign (-) followed by the name of
the switch, e.g., "/-DPY".
The currently available switches are listed and explained below.
Switch names can be abbreviated to any extent that leaves them
unambiguous.
Command Lines and Switches Page 9
TYPE NAME MEANING OF SWITCH
Date Switches Each of these switches must be followed by a date
argument. The argument format is explained above
in the section on DATES. The effect of a date
switch is permanent until changed by another date
switch.
FROM The argument following this switch specifies the
beginning date in the range of dates for which
stories are to be retrieved. This switch clears
any beginning time given in a previous command
line.
TO The argument following this switch specifies the
ending date in the range of dates for which stories
are to be retrieved. This switch clears any ending
time given in a previous command line.
ON The argument following this switch specifies the
entire date range. See the section on DATES. This
switch clears any beginning and ending times given
in previous command lines.
DURING This switch is identical to the /ON switch.
Time Switches Each of these switches must be followed by a time
argument. The argument format is explained above
in the section on the TIME RANGE. The effect of a
time switch is permanent until changed by another
time switch or cleared by a date switch.
AFTER The argument following this switch specifies the
beginning time on the beginning date.
BEFORE The argument following this switch specifies the
ending time on the ending date.
Mode Switches Each of these can occur either in a positive sense
(without a minus sign) or in a negative sense (with
a minus sign). A mode switch is temporary in
effect only when occurring after a keyword
expression; other occurrences are permanent. The
initial modes in effect when NS starts up are:
/AP /NYT /-AGAIN /CHRONO /SHOW /DPY /-HEADLI
AP Use the Associate Press news when evaluating a
keyword expression. In /-AP mode, no AP stories
will be checked against expressions. This switch
and the /NYT switch below are independent.
Together they determine what combination of news
wires is used as the source of stories.
NYT Use the New York Times News Service stories when
evaluating a keyword expression. In /-NYT mode, no
Command Lines and Switches Page 10
NY Times stories will be checked against
expressions. See also the /AP switch above.
AGAIN Do not remove from new story lists all stories that
have already been presented (in part or in whole)
to the user. In /-AGAIN mode (the default), all
stories you have actually seen are removed from
each new current story list generated; this
prevents stories that you have read from being
retrieved again by new keyword expressions. When a
new part (follow-up story) is added to a story
already seen, the whole story is then marked as
unseen so that you can access the new part. See
also the /UNSEEN command switch below, which marks
all stories as unseen.
CHRONO Construct story lists with the stories in
chronological order (oldest first). /-CHRONO
causes story lists to be constructed in reverse
chronological order.
SHOW Each time a keyword expression is typed,
automatically enter display level (unless no
stories match expression). When display level is
entered, the beginning of the first story of your
current story list is automatically presented. In
/-SHOW mode, when a keyword expression is typed,
the program merely types out the number of stories
in the resultant story list. To enter display
level at any time, type the command switch /PRESEN.
The display-level commands available are described
in the section below on DISPLAY COMMANDS.
DPY This switch is meaningful only when the program is
running on a Stanford display. Such a display in
/-DPY mode will be treated like a non-display.
HEADLI For each story list constructed with two or more
stories, a headline story is added at the beginning
of the list. This headline story will contain the
first few lines of each story in the list. The
positive sense of this switch takes an optional
argument consisting of an equals sign (=) followed
by a number specifying the requested number of
headline-story lines devoted to each real story
(e.g., "/HEADLI=5"). This number should be between
1 and 8 inclusive. If the argument is omitted, the
default number of lines per story will be used;
this default is currently 3. See the section below
on HEADLINE STORIES.
Command Lines and Switches Page 11
Command Switches Each of these may only appear by itself on a
command line.
PRESEN Enter display level and present the first frame of
the first story in the current story list.
UNSEEN Pretend that no stories have been presented to the
user. This resets the list of stories already seen
to null so that no stories will be removed from
your next current story list for already having
been seen. Stories seen after this command switch
is given will nevertheless be added to the (newly
cleared) list of stories seen, and the state of the
/AGAIN mode switch (which see above) is unaffected
by this switch.
FRAME Set the frame size for teletype-mode news
presentation to the number of lines indicated by
the numerical argument following this switch. For
example, "/FRAME=15" will cause the second and
subsequent frames of each story typed out to
contain 15 lines (until the end of the story). See
the explanation of frame size at the beginning of
the section on DISPLAY COMMANDS.
INFILE Take subsequent command lines from a given file.
The input file can be specified by giving its name
as an argument to this switch. If no argument
appears, the file OPTION.TXT on your current
(ALIAS) disk area will be used. See the section on
COMMAND FILE INPUT for the format of command lines
in the input file.
INPUT Resume taking command lines from currently open
command file. The switch /-INPUT causes the
program to resume reading command lines from the
user's terminal. (/-INPUT is usually only
meaningful when read from a command file, and
/INPUT is only meaningful when read from the
terminal.)
EXIT Exit to monitor level. If you then decide you did
not really want to exit, typing the monitor command
CONTINUE will get you back into NS correctly.
HELP Present some information on the use of NS.
SWITCH Type out the names of all the switches.
MODES Type out the current values of the mode switches.
DATES Type out the current time/date range and the oldest
date for which news is available. See the section
on DATES.
REVERS Reverse the order of the current story list
(changing the order of only that list from
chronological to reverse chronological or vice
versa).
Command Lines and Switches Page 12
COUNT Type out the number of stories in the current story
list.
EXCHAN Exchange the current story list and the previous
story list. Then type out the number in the new
current story list.
UPDATE When next referencing today's news get a fresh
version of the data file containing the
categorization lists. This permits you to retrieve
stories that have come in since you started up NS
(or since you last gave this command). This is not
necessary if your date range includes more dates
than just today.
Display Commands
Stories are presented to the user when the program is at display
level. Display level is entered automatically after a keyword
expression is typed if the program is in /SHOW mode. The user can
enter display level explicitly by typing the command switch /PRESEN,
which can be abbreviated /P.
The amount of a story that NS presents at one time is called a FRAME.
If you are running NS from a Stanford display, each
frame is a screenful of text (about 30 lines) and a
single story can be made up of from one to several
frames, only one of which can be displayed at a time.
Consecutive frames of a story overlap by half a
screenful. A double arrow (ā) marks the middle of
the screen to indicate where text will move to when
the next frame is displayed.
If you are running NS from some other kind of
terminal, the first frame contains the first five
lines of the story. (This lets you see what the
story is about before the rest of it is typed out.)
The remainder of the story makes up the second frame
unless you have used the /FRAME switch to indicate
the number of lines you want the second and
subsequent frames to contain. For instance, if you
have said "/FRAME=9" then each frame after the first
one will have 9 lines, until either the end of the
story is reached or about 20 frames have been used.
In the latter case, the rest of the story will all be
Display Commands Page 13
included in the last frame, which thus may be longer
than the frame size you have indicated; this will not
happen unless you have chosen a very small frame size
(like 4 or 5). The purpose of having a settable
frame size is to allow users of display terminals (at
Stanford or elsewhere) to have the typeout stop
before unread parts have gone off screen.
When display level is entered (on either kind of terminal), the first
frame of the first story in your current story list is presented
(displayed or typed out). After NS has presented a frame of a story,
it will await a display command from you. On Stanford displays each
display command is a single character, perhaps preceded by a
numerical argument. On other terminals, a display command is a
single character, perhaps preceded by a numerical argument, and
followed by a CARRIAGE RETURN.
Each story in your current story list is actually made up of one or
more news service stories which have been linked together by the NS
system. Each one of the news service stories is called one PART of
the story from your story list. Display commands are oriented
towards displaying either another frame of the same part, another
part of the same story or another story in the main list.
Furthermore, for each display command that moves you forward a frame,
part or story, there is a command that moves you backward a frame,
part or story. Thus there are six basic display commands, each of
which can be preceded with a numerical argument.
U Advance to the next story in the main story list. If this
command has a numerical argument, advance that many stories
in the main list.
I Same as U but backup in main story list instead of advancing.
- - -
J Advance to the next part of the current story. If current
part is the last one, advance to first part of next story.
If this command has a numerical argument, advance that many
parts in the current story, but not beyond the last part of
this story.
K Same as J but backup one or more parts instead of advancing.
If current part is the first one, backup to the last part of
the previous story. With an argument, do not backup past
first part of current story.
- - -
Display Commands Page 14
M Advance to the next frame of the current part. If current
frame is last one, advance to first frame of next part (or
next story if no more parts). With an argument, advance that
many frames in current part without going beyond the last
frame of this part.
, (comma) Same as M but backup one or more frames instead of
advancing. If current frame is first one of this part,
backup to the last frame of the previous part (or last frame
of last part of previous story if current part is first part
of story). With an argument, do not backup beyond the first
frame of the current part.
On non-displays, typing a blank line as a display command advances to
the next frame exactly like the M command above. On displays, no
carriage return is used with display commands.
On displays, typing one of the above six display commands with either
or both of the CONTROL and META keys down is the same as typing that
command with an argument of 99999. This will advance (or backup) to
the last (first) frame, part or story depending on the command.
If you attempt to advance to the next story when you are already
looking at the last story in your current story list, then you will
automatically leave display level and NS will ask for a command line
to be entered next. You will similarly leave display level if you
try to backup to the previous story when you are already looking at
the first story in the list.
In addition to the above commands, there are several other commands,
including two which cause the program to leave display level.
Q Quit display level and return to command level. NS will type
out "*KEY: " and expect a command line next (unless you
currently have an command file open and active, in which case
NS will type an at-sign (@) and read a command line from the
input file).
E Exit to the monitor. On displays this command requires both
of the CONTROL and META keys and will return the display to
its normal state. (On displays an "E" typed without both
CONTROL and META will be a no-op.) If you decide after
exiting that you were not finished, type the monitor command
CONTINUE and you will be back to display level exactly where
you were before you exited. On displays, CONTROL-META-E will
also exit and normalize the display when typed as a command
line.
Display Commands Page 15
? (question mark) This causes the program to present the user
with some helpful information about the various display
commands.
V This command is ignored except on displays, where it causes
the screen to be redrawn.
X This command tells NS to read an extended command from the
terminal. The extended commands are listed below and may be
abbreviated as much as desired provided that they do not
become ambiguous. Each of these commands should be ended
with a carriage return. Numerical arguments to these
commands must precede the "X". On non-displays, the carriage
return following the display command X is omitted and the "X"
is followed by the extended command name and a carriage
return, for instance, "2 X HEADLI<cr>" (the spaces shown in
this example are optional). On any terminal, if the extended
command name is followed by an activation character other
than carriage return, the extended command will be aborted.
NAME MEANING OF EXTENDED COMMAND
HEADLI Present the headline story for the current story
list, creating that headline story if necessary.
If there is a numerical argument (which should be
between 1 and 8), allocate that many lines per
story in the headline story. If no argument is
given, 3 lines will be allocated for each story.
See the section below on HEADLINE STORIES.
DSTORY Delete the current story from the current story
list. This is particularly useful if the current
story is not really of interest and you are going
to output the current story list to a file, the
line printer or the XGP. If there is only one
story left in the current story list when you give
this command, that story is not deleted and the
program leaves display level.
DPART Delete the current part from the current story
list. This is like DSTORY except that it does not
delete other parts of the current story.
ESCAPE-I Manual Interruptions Page 16
ESCAPE-I Manual Interruptions
Certain operations done by NS may occasionally take long to complete.
The user (of a Stanford display) can interrupt certain such
operations by typing ESCAPE-I. This will cause NS to stop what it is
doing at the next reasonable point and return control to the user.
(Although this type of interruption is not currently available on
non-displays, it may soon be implemented for such terminals through a
similar mechanism.)
The following operations can be interrupted:
Making headline stories. If you interrupt NS while it is
doing this, the headline story will be left incomplete
(marked so by "..." at the end) but will be presented to you
as though it had been finished.
Outputting stories to a file. If you interrupt NS while it
is doing this, the output will be discarded. If the output
file was to have been spooled, it will not be.
Evaluating a keyword expression for two or more days of news.
If your date range contains two or more days, NS will finish
using the day's data that is in core when you interrupt and
then return as if the evaluation of the expression had been
completed.
With any of these interrupts, automatic reading of any command file
will be suppressed.
Output Files
The command switch /OUTPUT causes all the stories (and parts) in your
current story list to be output to a given file. To specify the
filename for such output, follow the /OUTPUT switch with a filename
argument (which can include extension and PPN, if desired). If you
do not include a filename argument, the file NS.NS on your current
(ALIAS) disk area will be used. If you give a filename without an
extension, the extension .NS will be used.
If the output file already exists, then you will be asked whether you
want it replaced or extended with the new stories or whether you want
Output Files Page 17
to abort the file output. However, if you follow the output filename
with one of the switches "/REPLACE", "/EXTEND" and "/ABORT", then if
the output file already exists, the action specified by that switch
will be taken without your being asked.
In addition, if the output filename is followed by the switch
"/SPOOL", then the output file will be spooled on the line printer
when the output is done. The switch "/XSPOOL" following the filename
will cause the output file to be spooled on the XGP.
Finally, the command switches /SPOOL and /XSPOOL are available for
spooling the stories in your current story list without saving them
in a file. For these switches, the output is directed to a file on
your real (logged-in) disk area with a name like $NEWS0.NS, which
will be spooled and deleted.
If you type ESCAPE-I (on a Stanford display) while NS is outputting
stories to a file (whether or not for spooling), the output will be
discarded and any spooling suppressed.
Each story output to a file (whether for spooling or not) will be
followed in the file by a row of stars (*'s). Individual parts of
the same story will be separated by rows of dashes (-'s). To let you
know how far the output has gotten, when the first (or only) part of
a story is output, a dollar sign ($) will be typed on your terminal
and as each subsequent part of the same story is output, a dash (-)
will be typed out.
Command File Input
The command switch /INFILE causes NS to endeavor to read subsequent
command lines from a command file. The name of the command file
should follow the /INFILE switch. If no filename is included, the
file OPTION.TXT on your current (ALIAS) disk area will be read. If
no extension is specified with an input filename, the extension
".TXT" will be used. If no primary name is specified, the primary
name "OPTION" will be used. In PPN specifications, if no programmer
name is given, that of your current ALIAS will be used. Thus to
specify the OPTION.TXT file from a different project under your
current programmer name, type "[PRJ]", where PRJ is the project name
of the disk area you want. Also, the right square bracket (])
closing the PPN is optional. NS can handle most (if not all) text
file formats, including SOS and E/TV.
Now a word about how command files are interpreted.
Command File Input Page 18
The collection of command lines in a command file must be preceded by
"NS:" which must be the first thing on a line. Different command
lines within the file should be separated with commas (,) and the
last command line followed by a semicolon (;). Carriage returns,
linefeeds, formfeeds (page marks), tabs and nulls are all discarded
when read from a command line in a command file. If a blank command
line is read from a command file, then exactly one command line will
be read from the terminal before going back to reading from the
command file.
Every command line line read from a command file will be typed out
preceded by an at-sign (@) to indicate that it came from the file.
Here is a sample command file (OPTION.TXT):
LOGIN: WHO;
NS: AP*NEWS*DIGEST/-SHOW, /OUTPUT DIGEST/REPLACE, /-INPUT,
/SHOW BULLETIN,,URGENT,(TRAIN+PLANE)*CRASH;
This file contains seven command lines. The first one ("AP*NEWS*
DIGEST/-SHOW") will find some stories but will not present any of
those stories. The second command line will cause the stories found
in the first command to be output to the file DIGEST.NS, replacing
any old file of the same name. The third command line ("/-INPUT")
will cause NS to discontinue reading commands from the command file.
Commands will be read from the terminal until the user types
"/INPUT", which will cause NS to resume reading from the command file
where it left off. Then "/SHOW BULLETIN" may display some stories,
one command line will be read from the terminal, and next "URGENT"
may display some stories, after which "(TRAIN+PLANE)*CRASH" will be
evaluated and may display some stories.
Headline Stories
Through use of either the /HEADLI switch or the XHEADLI display
command, a special headline story can be generated which will include
the first few lines of each story in your main story list. Such a
headline story can allow you to choose which stories you want to read
in more detail.
The headline story is created in core by reading in the first few
lines of each main story and combining this text into the headline
story. The headline story is not actually created until you ask to
Headline Stories Page 19
see it. To create this story requires NS to do about 5 disk
operations (as counted in the wholine) per main story in the list.
Thus if there are several hundred stories, it will take NS several
seconds to create this story. However, once the story is created, it
is kept in core until you change story lists. The headline story is
inserted at the front of the story list and is referred to as story 0
in the list.
Text is packed into the headline story as tightly as possible with
carriage returns, linefeeds, and redundant spaces omitted. The first
line of each entry in the headline story begins with the number of
the particular story within your main story list. This is followed
by the story's sequence number and the day of the month the story is
from. Subsequent lines for the same story's entry are indented. The
number of lines of headline story devoted to each story in the list
is always between 1 and 8 and is determined either by the user in an
argument to the /HEADLI switch or to the XHEADLI display command or
by the program if such an argument is not given or is unreasonable.
The default number of lines of headline story allocated to each story
is currently 3. If there are more stories than can be included in
the headline story, the headline story is made up of stories from the
front of the story list until space runs out, at which point "..." is
placed at the end of the headline story to indicate that it is
incomplete.
If you type ESCAPE-I (on a Stanford display) while a headline story
is being made, the headline story will be left incomplete (and marked
so with "...") and then presented to you.
Using NS
To start NS, type the monitor command: NS. This command starts NS
with some temporary privileges that are needed by the program. Any
monitor command that attempts to change your core image or disk ALIAS
will disable these privileges and prevent NS from working.
Furthermore, to use NS you must be a local user at the AI Lab or have
the local-user privilege. This is a restriction we must enforce "to
insure that the news is not published or broadcast or publicly
displayed or used for any commercial purpose."
When started up, NS will tell you for how far back in time news is
available. Then it will type out "*KEY: " to indicate that it is
waiting for a command line to be typed in. When at display level
awaiting a display command from a Stanford display, NS will typeout a
Using NS Page 20
space and a dot (.) and will show a "DL" in the middle of the header
line at the top of the screen. When awaiting a display command from
any other terminal, NS will type out either a short row of dashes
(-'s), a short row of stars (*'s) or a space and a dot. The space
and dot are used if the frame just typed out is not the last frame of
the current part (that is, if there is more text in this part). The
space and dot will appear on the end of the last line of the frame
just typed out. The dashes or stars are used if the frame just typed
out was the end of a part; dashes indicate that there is at least one
more part to the current story and stars indicate that there are no
more parts to that story.
Comments on the Format of News Service Stories
Each story received over one of the news wires has a sequence number
which comes at the beginning of the story and a date and/or time that
come at the end. After the sequence number, we insert the date and
time (Pacific Time) we received the story. The sequence numbers
start over every day, with the first story that comes after about
midnight Eastern Time getting number 001. The sequence number
appearing at the beginning of a story will have a one letter prefix
that identifies the originating news wire: "a" for Associated Press
and "N" for New York Times.
Some special stories (advance stories) are given sequence numbers out
of the normal order; these stories have numbers greater than 400 for
the AP or greater than 100 for the New York Times. The time at the
end of each story is put in by the wire service and is generally the
local time when the story was sent over the wire.
Every twelve hours (at about noon and midnight Eastern Time) there is
an AP news digest that summarizes the AP stories that are known to be
coming in over the next twelve hours. The digest at midnight is
usually story number a002 and is called the PMs digest; the one at
noon is usually number a202 and is called the AMs digest. No PMs
digest is sent for Sunday. AP stories that have been mentioned in
the latest digest bear the heading word "BJT" (for "budget").
There are many stories every day that are corrections or additions to
previous stories. We try to link up each such follow-up with the
original and treat the resultant combination as one story. We call
each of the separately numbered news service stories a PART of the
total story. Long stories are usually broken up into smaller stories
by the wire services; the partial stories are called TAKES and each
Comments on the Format of News Service Stories Page 21
gets its own sequence number. We sometimes link together several
takes just like additions and corrections.